<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>协程性能测试 | 协程</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../chapter9/9_0.html" />
    
    
    <link rel="prev" href="../chapter7/7_0.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="8"
        data-chapter-title="协程性能测试"
        data-filepath="chapter8/8_0.md"
        data-basepath=".."
        data-revision="Sat Oct 13 2018 10:54:16 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
                
                <li>
                    <a href="http://www.0voice.com" target="blank" class="custom-link">ntyTcp</a>
                </li>
            
            

            
            <li class="divider"></li>
            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        前言
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="chapter1/1_0.html">
            
                
                    <a href="../chapter1/1_0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        协程的起源
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="chapter2/2_0.html">
            
                
                    <a href="../chapter2/2_0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        协程的案例
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3" data-path="chapter3/3_0.html">
            
                
                    <a href="../chapter3/3_0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        协程的实现之工作原理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4" data-path="chapter4/4_0.html">
            
                
                    <a href="../chapter4/4_0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        协程的实现之原语操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5" data-path="chapter5/5_0.html">
            
                
                    <a href="../chapter5/5_0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        协程实现之切换
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6" data-path="chapter6/6_0.html">
            
                
                    <a href="../chapter6/6_0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        协程实现之定义
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7" data-path="chapter7/7_0.html">
            
                
                    <a href="../chapter7/7_0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        协程实现之调度器
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="8" data-path="chapter8/8_0.html">
            
                
                    <a href="../chapter8/8_0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        协程性能测试
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9" data-path="chapter9/9_0.html">
            
                
                    <a href="../chapter9/9_0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        协程多核模式
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >协程</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="8&#x534F;&#x7A0B;&#x6027;&#x80FD;&#x6D4B;&#x8BD5;">8.&#x534F;&#x7A0B;&#x6027;&#x80FD;&#x6D4B;&#x8BD5;</h1>
<p>&#x6D4B;&#x8BD5;&#x73AF;&#x5883;&#xFF1A;4&#x53F0;VMWare &#x865A;&#x62DF;&#x673A;<br>1&#x53F0;&#x670D;&#x52A1;&#x5668; 6G&#x5185;&#x5B58;&#xFF0C;4&#x6838;CPU<br>3&#x53F0;&#x5BA2;&#x6237;&#x7AEF; 2G&#x5185;&#x5B58;&#xFF0C;2&#x6838;CPU<br>&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#xFF1A;ubuntu 14.04<br>&#x670D;&#x52A1;&#x5668;&#x7AEF;&#x6D4B;&#x8BD5;&#x4EE3;&#x7801;&#xFF1A;<a href="https://github.com/wangbojing/NtyCo" target="_blank">https://github.com/wangbojing/NtyCo</a> 
&#x5BA2;&#x6237;&#x7AEF;&#x6D4B;&#x8BD5;&#x4EE3;&#x7801;&#xFF1A;<a href="https://github.com/wangbojing/c1000k_test/blob/master/client_mutlport_epoll.c" target="_blank">https://github.com/wangbojing/c1000k_test/blob/master/client_mutlport_epoll.c</a></p>
<p>&#x6309;&#x7167;&#x6BCF;&#x4E00;&#x4E2A;&#x8FDE;&#x63A5;&#x542F;&#x52A8;&#x4E00;&#x4E2A;&#x534F;&#x7A0B;&#x6765;&#x6D4B;&#x8BD5;&#x3002;&#x6BCF;&#x4E00;&#x4E2A;&#x534F;&#x7A0B;&#x6808;&#x7A7A;&#x95F4; 4096byte<br>6G&#x5185;&#x5B58; &#x2013;&gt; &#x6D4B;&#x8BD5;&#x534F;&#x7A0B;&#x6570;&#x91CF;100W&#x65E0;&#x5F02;&#x5E38;&#x3002;&#x5E76;&#x4E14;&#x80FD;&#x591F;&#x6B63;&#x5E38;&#x6536;&#x53D1;&#x6570;&#x636E;&#x3002;</p>
<p><img src="../image/9_1.png" alt="&#x6027;&#x80FD;&#x6D4B;&#x8BD5;&#x56FE;1">
<img src="../image/9_2.png" alt="&#x6027;&#x80FD;&#x6D4B;&#x8BD5;&#x56FE;2"></p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../chapter7/7_0.html" class="navigation navigation-prev " aria-label="Previous page: 协程实现之调度器"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../chapter9/9_0.html" class="navigation navigation-next " aria-label="Next page: 协程多核模式"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"theme-default":{"showLevel":false},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
